# -*- coding:utf-8 -*-
import random
# print("==============\n姓名：王小二\nQQ：145454\n公司地址：海新路\n==============")
# score = int(input("输入你的成绩："))
#
# if score >= 90 and score <= 100:
#     print('本次考试，等级为A')
# elif score >= 80 and score < 90:
#     print('本次考试，等级为B')
# elif score >= 70 and score < 80:
#     print('本次考试，等级为C')
# elif score >= 60 and score < 70:
#     print('本次考试，等级为D')
# elif score >= 0 and score < 60:
#     print('本次考试，等级为E')
# elif score < 0:
#     print("你是傻瓜")










chePiao = 1     # 用1代表有车票，0代表没有车票
daoLenght = 9     # 刀子的长度，单位为cm

if chePiao == 1:
    print("有车票，可以进站")
    if daoLenght < 10:
        print("通过安检")
        print("终于可以见到Ta了，美滋滋~~~")
    else:
        print("没有通过安检")
        print("刀子的长度超过规定，等待警察处理...")
else:
    print("没有车票，不能进站")
    print("亲爱的，那就下次见了，一票难求啊~~~~(>_<)~~~~")


# i = 0
# while i < 100:
#     i = i+1
#     player = input('请输入：剪刀(0)  石头(1)  布(2):')
#
#     player = int(player)
#
#     computer = random.randint(0,2)
#
#     # 用来进行测试
#     #print('player=%d,computer=%d',(player,computer))
#
#     if ((player == 0) and (computer == 2)) or ((player ==1) and (computer == 0)) or ((player == 2) and (computer == 1)):
#         print('获胜，哈哈，你太厉害了')
#     elif player == computer:
#         print('平局，要不再来一局')
#     else:
#         print('输了，不要走，洗洗手接着来，决战到天亮')

i = 1
sum = 0
while i<=100:
    if i%2 == 0:
        print(i)
        sum = sum + i
    i+=1

print("1~100的累积和为:%d"%sum)
#
# i = 1
# while i <= 9:
#     j = 1
#     while j <= i:
#         print("%d*%d=%-2d " % (j, i, i * j), end='')
#         j += 1
#     print('\n')
#     i += 1


# i = 1
# while i <= 9:
#     j = 1
#     for  j in range(i):
#         j = j + 1
#
#         print("%d*%d=%d"%(i,j,i*j),end= "|")
#
#     print('\n')
#     i = i + 1

for x in range (3):
    print(x,end=" ")

name = "zhengjie"
print(name[8::-1])
mystr = 'hello world itcast and itcastcpp'
print(mystr.find('w'))
print(mystr.count('c'))

print( 'a\tb')

a = 'acdfasdfasfdb'
print(a)
print(a.split('a'))

print(a.split( sep='a' ,maxsplit=7))

namesList = ['xiaoWang', 'xiaoZhang', 'xiaoHua']
print(namesList[0])
print(namesList[1])
print(namesList[2])

namesList = ['xiaoWang', 'xiaoZhang', 'xiaoHua']
for name in namesList:
    print(name)
















